package com.mengxuegu.oauth2.server.service;

import com.mengxuegu.oauth2.web.entities.SysUser;
import com.mengxuegu.oauth2.web.service.SysUserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RequiredArgsConstructor
public class CustomUserDetailsService extends AbstractUserDetailsService {
    private final SysUserService sysUserService;

    @Override
    SysUser findSysUser(String usernameOrMobile) {
        return sysUserService.findByUsername(usernameOrMobile);
    }
}
